{% extends site.theme|stringformat:"s/include/base.html" %}
{% block title %}SDCms 首页{% endblock %}
{% block script %}
<style type="text/css">

    .formTable{
    }
    .fromLabel{
    	width: 100px;
    }
    .fromField{
    	width: 300px;
    }
    .fromInfo{
    	width: 150px;
    }
</style>
{% endblock %}
{% block mainer %}
<h1>{{ Hello }}</h1>

<p>现在时间是： {{ current_date }}.</p>
<form action="/{%ifequal userForm.id -1%}add{%else%}edit{%endifequal%}!User.do" method="post" view="User">
<table class="formTable">
{% include site.theme|stringformat:"s/include/form.html" with form=userForm %}
<tr class="formTr">
	<td></td><td colspan=2 class="formBtn"><input id="btnOK" type="submit" value="提交"><input type="reset" value="重置">
		<input name="_id"  id="_id" type="Hidden" value="{{userForm.id}}"></td>
</tr>
</table>
</form>
<script type="text/javascript">
inital();
bindForms();
function inital(){
	//$("#btnOK").click(function(){alert("测试jquery！");return false;});
	$("#btnOK").click(function(){$(this).parentsUntil('form').parent('form').submit();});
}
</script>
{% endblock %}